<template>
  <h1 v-text="attrs.msg"></h1>
  <h1 v-text="attrs.person.realName"></h1>
  <h1 v-text="attrs.person.slogan"></h1>
  <button type="button" @click="updateName">点我试试</button>
</template>

<script>
import {ref} from "vue";

export default {
  name: "LhzG",
  setup(props, context) {
    const {attrs, emit} = context;
    const myName = ref('李胜龙');
    const updateName = function () {
      emit('updateName', myName);
    };
    return {
      attrs, updateName
    }
  }
}
</script>

<style scoped>

</style>